/*
 * @Author: your name
 * @Date: 2021-10-12 16:41:19
 * @LastEditTime: 2021-10-22 10:22:04
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Vuec:\Users\86131\Desktop\MyVue\shop\src\utils\api.js
 */
// api.js是用来管理整个项目的所有接口的
import http from "./http";

//添加购物车数据
export const shopCarApi = (params) => http.post("/cart/get", params, 1);

//热门数据
export const hotList2 = (params) => http.get("/api/hot", params, 1);

//精选数据
export const selectedApi = (params) => http.get("/api/selected", params, 1);

//热门课程数据
export const classHotApi = (params) => http.get("/api/hot", params, 1);

//详情页数据
export const detailApi = (params) => http.post("/api/getdetail", params, 1);

//注册页请求
export const registerApi = (params) =>
  http.post("/register/getCode", params, 3);
//登录页面数据
export const loginApi = (parmas) => http.post("/register", parmas, 3);
